<template>
  <div ref="domRef">
    <PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
      <BasicTable @register="registerTable" class="w-2/4 xl:w-6/12 m-4 mr-0 bg-white">
        <template #action="{ record }">
          <TableAction
            :actions="[
              {
                icon: 'clarity:note-edit-line',
                tooltip: '编辑用户资料',
              },
              {
                icon: 'ant-design:delete-outlined',
                color: 'error',
                tooltip: '删除此账号',
              },
            ]"
          />
        </template>
      </BasicTable>
      <div class="w-2/4 xl:w-6/12 m-4 bg-white">
        <Description
          size="small"
          title="发货复核"
          :bordered="false"
          :column="2"
          :data="orderData"
          :schema="orderFields"
        >
          <template #title><b>发货复核</b></template>
        </Description>
      </div>
    </PageWrapper>
  </div>
</template>
<script lang="ts">
  import { Row, Col } from 'ant-design-vue';
  import { defineComponent, onMounted, ref } from 'vue';
  import { useFullscreen } from '@vueuse/core';
  import { PageWrapper } from '/@/components/Page';
  import { BasicTable, useTable, TableAction } from '/@/components/Table';
  import { columns, orderFields } from './schema.data';
  import { getAccountList } from '/@/api/system/system';
  import { Description } from '/@/components/Description/index';

  export default defineComponent({
    components: {
      [Row.name]: Row,
      [Col.name]: Col,
      PageWrapper,
      BasicTable,
      TableAction,
      Description,
    },
    setup() {
      const domRef = ref(null);
      const { toggle: toggleDom } = useFullscreen(domRef);
      const orderData = [];
      const [registerTable] = useTable({
        title: '订单编号',
        api: getAccountList,
        columns,
        pagination: false,
        bordered: true,
        actionColumn: {
          width: 80,
          title: '操作',
          dataIndex: 'action',
          slots: { customRender: 'action' },
        },
      });

      onMounted(() => {
        toggleDom();
      });
      return {
        domRef,
        registerTable,
        orderData,
        orderFields,
      };
    },
  });
</script>
<style lang="less" scoped>
  #delivery_box :deep(.ant-col) {
    background: #ffffff;
  }
</style>
